<?php
/**
 * 上传类
 * User: Administrator
 * Date: 2018/7/21
 * Time: 13:49
 */

namespace app\merchant\controller;


class Upload  extends Init
{
    function _initialize()
    {
        parent::_initialize();
        $this->model = model('common/upload');
    }

    public function upfile(){
        return json($this->model->upfile('files'));
    }

    public function upimage_s(){
        $list = $this->model->upfile('images');
        if($list['code']==200){
            return json(array('code'=>200,'msg'=>'添加成功','data'=>$list));
        }else{
            return json(array('code'=>0,'msg'=>'添加失败'));
        }

    }


}